package com.beiding.mpTimer;

import java.io.Serializable;


/**
 * 任务的持久化对象
 * <p>
 * 是实际任务的载体
 */
public class TaskPersistence implements Serializable {

    private static final long serialVersionUID = 0L;

    private String id;

    //负载
    private Serializable payload;

    //主题
    private String topic;

    //发生时间点
    private long time;

    //发生时间戳
    private long timeMillis;

    TaskPersistence(String id, Serializable payload, String topic, long time, long timeMillis) {
        this.id = id;
        this.payload = payload;
        this.topic = topic;
        this.time = time;
        this.timeMillis = timeMillis;
    }


    public String getId() {
        return id;
    }

    public Serializable getPayload() {
        return payload;
    }

    String getTopic() {
        return topic;
    }

    long getTime() {
        return time;
    }

    public long getHappenTimeMillis() {
        return timeMillis;
    }
}
